package com.ym.medical.domain.param;

import com.ym.common.annotations.CustomConstraint;
import com.ym.common.constant.BeanCovert;
import com.ym.base.enums.FlagEnum;
import com.ym.medical.domain.entity.UserReplayTemplateEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;

import static com.ym.common.constant.ValidRule.Add;
import static com.ym.common.constant.ValidRule.Update;

/**
 * 自定义回复模板对象 user_replay_template
 *
 * @author ym
 * @date 2020-08-21
 */
@ApiModel("自定义回复模板-修改")
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserReplayTemplateUpdateParam extends BeanCovert<UserReplayTemplateEntity> {

	@ApiModelProperty("主键")
	@NotNull(message = "主键不能为空", groups = {Add.class, Update.class})
	private Long id;

	@ApiModelProperty("模板标题")
	@Size(max = 2, message = "模板标题长度超过{max}", groups = {Add.class, Update.class})
	private String tepTitle;

	@ApiModelProperty("模板内容")
	@Size(max = 500, message = "模板内容长度超过{max}", groups = {Add.class, Update.class})
	private String tepContent;

	@ApiModelProperty("是否删除")
	@Size(max = 2, message = "是否删除长度超过{max}", groups = {Add.class, Update.class})
	@CustomConstraint(FlagEnum.class)
	private String theDel;

	@ApiModelProperty("是否系统")
	@NotEmpty(message = "是否系统不能为空", groups = {Add.class, Update.class})
	@Size(max = 2, message = "是否系统长度超过{max}", groups = {Add.class, Update.class})
	@CustomConstraint(FlagEnum.class)
	private String theSys;

	@ApiModelProperty("创建人")
	@NotNull(message = "创建人不能为空", groups = {Add.class, Update.class})
	private Long creSb;

	@ApiModelProperty("创建时间")
	@NotNull(message = "创建时间不能为空", groups = {Add.class, Update.class})
	private Date creTime;

}
